﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace Flit.Tests
{
    [TestFixture]
    public class ParameterTest
    {
        Parameter p;

        [SetUp]
        public void Setup()
        {
           p = new Parameter("int", "bar");
        }

        [Test]
        public void LowercaseName()
        {
            Assert.AreEqual("bar", p.LowercaseName);
        }
        [Test]
        public void TitleCaseName()
        {
            Assert.AreEqual("Bar", p.TitleCaseName);
        }

        [Test]
        public void AsPropertyDeclaration()
        {
            Assert.AreEqual("int Bar {get;set;}", p.AsPropertyDeclaration);
        }
        [Test]
        public void AsParameterDeclaration()
        {
            Assert.AreEqual("int bar", p.AsParameterDeclaration);
        }
        [Test]
        public void AsPropertySetter()
        {
            Assert.AreEqual("this.Bar = bar", p.AsPropertySetter);
        }
    }
}
